#ifndef __DRIVER_ENCODER_H
#define __DRIVER_ENCODER_H

#include "main.h"

extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim3;
extern TIM_HandleTypeDef htim4;

#define TICK_TIM     htim1
#define Enc1_TIM        htim3
#define Enc2_TIM        htim4
#define Enc1A_CH        TIM_CHANNEL_2
#define Enc1B_CH        TIM_CHANNEL_1
#define Enc2A_CH        TIM_CHANNEL_2
#define Enc2B_CH        TIM_CHANNEL_1

typedef enum{
    Enc1 = 1,
    Enc2
}EncName;


int Encoder_Init(void);
float Encoder_GetSpeed(EncName encoder);

#endif